

				<link rel="stylesheet" href="__PUBLIC__/Shop/common.css">
				<link rel="stylesheet" href="__PUBLIC__/Shop/index.css">
     	<link rel="stylesheet" href="__PUBLIC__/Shop/cartpaylist.css">
     	<link rel="stylesheet" href="__PUBLIC__/Shop/base.css">
		<link rel="stylesheet" href="__PUBLIC__/Shop/head.css">

				<link rel="stylesheet" href="__PUBLIC__/Shop/layer.css" id="layui_layer_skinlayercss" style="">
				<link rel="stylesheet" href="__PUBLIC__/Shop/layer.ext.css" id="layui_layer_skinlayerextcss" style="">
				<include file="Public:header" />
                <!-- start: content-body -->
                <section role="main" class="content-body">
                    <header class="page-header">
                    </header>
                    <div class="row" style="background-color:#fff;">
						<header class="panel-heading">
							<h2 class="panel-title">我的购物车</h2>
						</header>
                        <section class="panel">
							<div class="wst-clear"></div>
							<!--8.24 新加css样式5-->
							<style>.wst-fl-right ul{float: right;}</style>
							<div class="wst-container">
								<div class="wst-cart-container">
									<div class="wst-cartlist-box">
										<div class="wst-cartlist-head">
											<div class="wst-head-title1">&nbsp;
											</div>
											<div class="wst-head-title2">商品</div>                      
											<div class="wst-head-title4">商品单价</div>
											<div class="wst-head-title5">库存状态</div>
											<div class="wst-head-title6">数量</div>
											<div class="wst-head-title7">总价</div>
											<div class="wst-head-title8">操作</div>
											<div class="wst-clear"></div>
										</div><br>
									<div id="wst_cartlist_pbox">
									<div id="wst_cart_shop_475" data="475">
									<div class="wst-cartlist-box">
										
										<div id="catgoodsList">
										
											<?php $zong=0 ?>
											<form id="form">
											<?php foreach($_SESSION['cart'] as $k=>$v){ ?>
											<div class="wst-cartlist-item" id="selgoods_21452_168047" style="border: 0px;">
													<input type="hidden" value="" class="goodsStockFlag">
													<div class="wst-cartlist-vb">
														<input type="checkbox" id="chk_goods_21452_168047" name="id[]" value="{$v['id']}" parent="475" dataid="168047" isbook="0" checked="">
													</div>
													<div class="wst-cartlist-item-col1">
														<div>
															<div class="wst-cartlist-bximg">
																<a target="_blank" href="">
																	<img src="{$v['image']}" width="60" height="60">
																</a>
															</div>
															<div class="wst-cartlist-gsname">
																<a target="_blank" href="">
																{$v['name']}
																</a>
															</div>
														</div>
													</div>
													<div class="wst-cartlist-item-col3">${$v['money']}元</div>
													<div class="wst-cartlist-item-col4" id="stock_21452">			                       
														有货
													</div>
													<div class="wst-cartlist-item-col5">
														<div class="wrap-input" style="">
															<input name="num{$v['id']}" class="text" style="width: 50px; text-align: center;" type="hidden" value="{$v['buy_num']}">
															{$v['buy_num']}
														</div>
													</div>
													<div class="wst-cartlist-item-col7">$<span id="prc_21452_168047">{$v['money']*$v['buy_num']}</span></div>
													<div class="wst-cartlist-item-col8"><a href="javascript:delCatGoods({$v['id']});">删除</a></div>
													<div class="wst-clear"></div>
											</div>
											<?php $zong+= $v['money']*$v['buy_num']?>
											<?php } ?>	
											</form>					               

											<script>
													function delCatGoods(id){
													layer.confirm('是否删除购物车此商品？', {
													  btn: ['确认','取消'] //按钮
													}, function(){
														$.ajax({
															 type: "POST",
															 url: "{:U('Shop/delShoppingCart')}",
															 data: {'id':id},
															 dataType: "json",
															 error: function(request) {
																layer.closeAll('loading');
																layer.msg("{$Think.lang.系统繁忙请稍后再试}");
															},
															beforeSend: function() {
																var index = layer.load(1, {
																  shade: [0.1,'#fff'] 
																});
															},
															 success: function(data){
																	layer.closeAll('loading');
																	layer.msg(data['info']);
																	if(data['status']==true){
																		setTimeout(history.go(0),1000);
																	}
																}
														});
													});
												};		
													function payShopping(id){
													layer.confirm('是否确认付款？', {
													  btn: ['确认','取消'] //按钮
													}, function(){
														$.ajax({
															 type: "POST",
															 url: "{:U('Shop/payShopping')}",
															 data: $("#form").serialize(),
															 dataType: "json",
															 error: function(request) {
																layer.closeAll('loading');
																layer.msg("{$Think.lang.系统繁忙请稍后再试}");
															},
															beforeSend: function() {
																var index = layer.load(1, {
																  shade: [0.1,'#fff'] 
																});
															},
															 success: function(data){
																	layer.closeAll('loading');
																	layer.msg(data['info']);
																	if(data['status']==true){
																		setTimeout(history.go(0),1000);
																	}
																}
														});
													});
												};				
											</script>											
										</div>
										<div class="wst-cart-total-money">
											 总计:<span class="wst-cart-unin">$<span id="shop_totalMoney_475">{$zong}</span>元&nbsp;&nbsp;</span>
										</div>
									</div>
									<br>
									</div>                
									</div>
									<div class="checkout-buttons group" id="checkout-floatbar">
											<div class="wst-chkod-yf1 col-md-6">
												<span class="total">{$pay_currency['name']}余额：<span style="color: red;">
														<strong id="payPriceId">$
															<span id="wst_cart_totalmoney" class="wst-cart-totalmoney">{$user_money[$pay_currency['id']]['num']}</span>
														</strong></span>
													</span>
											</div>
											<div class="wst-chkod-yf1 col-md-6">
												<span class="total">应付总额：<span style="color: red;">
														<strong id="payPriceId">$
															<span id="wst_cart_totalmoney" class="wst-cart-totalmoney">{$zong}</span>
														</strong></span>
													</span>
											</div>
											
										</div>
									<div>&nbsp;</div>
									<div class="cart-button clearfix">

										<li class="wst-btn-continue" onclick="javascript:toContinue();"></li>
										<li class="wst-btn-checkout" onclick="javascript:payShopping();" style=""></li>
										<div class="wst-clear"></div>
									</div>
								</div>
							
								<div class="wst-clear"></div>
							</div>
                        </section>
                    <!-- end: page -->
					</div>
                </section>
<include file="Public:footer" />